package com.example.zhaoping.serviceImpl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.zhaoping.entity.RefMenu;
import com.example.zhaoping.mapper.RefMenuMapper;
import com.example.zhaoping.service.RefMenuSerice;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class RefMenuServiceImpl implements RefMenuSerice {
    @Resource
    private RefMenuMapper refMenuMapper;

    @Override
    public RefMenu selectOne(QueryWrapper<RefMenu> queryWrapper) {
        RefMenu refMenu = refMenuMapper.selectOne(queryWrapper);
        return refMenu;
    }

    @Override
    public int inster(RefMenu refMenu) {
        return refMenuMapper.insert(refMenu);
    }

    @Override
    public int delect(int id) {
        return refMenuMapper.deleteById(id);
    }
}
